using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using MT.eVotePRS.Common;

namespace MT.eVotePRS.UI
{
    public partial class frmReportMenu : Form
    {
        static int functionNo = 0;
        public frmReportMenu(int fnNo)
        {
            InitializeComponent();
            functionNo = fnNo;
            
            if (functionNo == 0)
            {
                btnInvReport.Visible = true;
                btnInvReport.Enabled = true;
                btnIndividual.Visible = true;
                btnInvReport.Enabled = true;

                btnHandsetStatus.Visible = false;
                btnHandsetStatus.Enabled = false;
                btnHandsetEvent.Visible = false;
                btnHandsetEvent.Enabled = false;
                btnStudentStatus.Visible = false;
                btnStudentStatus.Enabled = false;
                btnStudentEvent.Visible = false;
                btnStudentEvent.Enabled = false;

                this.Text = "Report";
            }
            else
            {
                btnInvReport.Visible = false;
                btnInvReport.Enabled = false;
                btnIndividual.Visible = false;
                btnInvReport.Enabled = false;

                btnHandsetStatus.Visible = true;
                btnHandsetStatus.Enabled = true;
                btnHandsetEvent.Visible = true;
                btnHandsetEvent.Enabled = true;
                btnStudentStatus.Visible = true;
                btnStudentStatus.Enabled = true;
                btnStudentEvent.Visible = true;
                btnStudentEvent.Enabled = true;

                this.Text = "Inventory Report";
            }
        }

        private int retValue = 0;
        public int RetValue
        {
            get { return retValue; }
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            if (functionNo == 0)
            {
                retValue = -1;
            }
            else if (functionNo == 1)
            {
                retValue = 0;
            }

            this.Close();
            this.Dispose();
        }

        private void btnInvReport_Click(object sender, EventArgs e)
        {
            retValue = 1;
            this.Close();
        }

        private void btnIndividual_Click(object sender, EventArgs e)
        {
            retValue = 2;
            this.Close();
        }

        private void btnHandsetStatus_Click(object sender, EventArgs e)
        {
            retValue = 11;
            this.Close();
        }

        private void btnHandsetEvent_Click(object sender, EventArgs e)
        {
            retValue = 12;
            this.Close();
        }

        private void btnStudentStatus_Click(object sender, EventArgs e)
        {
            retValue = 13;
            this.Close();
        }

        private void btnStudentEvent_Click(object sender, EventArgs e)
        {
            retValue = 14;
            this.Close();
        }

    }
}